package com.baor.enums;

import com.github.yulichang.wrapper.enums.BaseFuncEnum;

public enum FuncEnum implements BaseFuncEnum {
    IF_SEX("IF(%s=0,'女','男')"),
    IF_TRUE("IF(%s=0,'否','是')"),
    IF_STATUS("IF(%s=0,'禁用','正常')"),
    IF_ADDRESS("IF(%s=0,'发货地址','收货地址')"),
    IF_GRANT("IF(%s=0,'未发放','已发放')"),
    IF_SUMMARY("IF(%s=0,'未结算','已结算')"),
    IF_WAYS("IF(%s=0,'首次分享链接','首次消费后')"),
    IF_CONSUME("IF(%s=0,'付款后','订单完成后')"),
    IF_HIDE("IF(%s=0,'隐藏','显示')"),
    IF_UPSCORE("IF(%s=0,'满足任一条件','满足全部条件')"),
    IF_INVOICE("IF(%s=0,'电子发票','纸质发票')"),
    IF_RECHARGE("IF(%s=0,'待支付','已支付')"),
    IF_METHOD("IF(%s=0,'手动','自动')"),
    IF_VIRTUAL("IF(%s=0,'虚拟商品','实物商品')"),
    IF_SELL("IF(%s=0,'销售中','仓库中')"),
    IF_DEFAULT("IF(%s=0,'默认规则','单独设置')"),
    IF_LEVEL("IF(%s=0,'一级','二级')"),
    IF_DISSTATUS("IF(%s=0,'未结算','已结算')"),
    CASE_EXAMINE("CASE %s WHEN 0 THEN '未审批' WHEN 1 THEN '审批未通过' WHEN 2 THEN '审批已通过' END"),
    CASE_METHOD("CASE %s WHEN 0 THEN '申请' WHEN 1 THEN '人人' WHEN 2 THEN '手动' END"),
    CASE_CONDITION("CASE %s WHEN 0 THEN '无条件' WHEN 1 THEN '消费次数' WHEN 2 THEN '消费金额' WHEN 3 THEN '购买指定商品' END"),
    CASE_CYCLE("CASE %s WHEN 0 THEN '月度' WHEN 1 THEN '季度' WHEN 2 THEN '年度' END"),
    CASE_MS("CASE %s WHEN 0 THEN '未提现' WHEN 1 THEN '提现中' WHEN 2 THEN '已提现' WHEN 3 THEN '余额充值' WHEN 4 THEN '余额体现' WHEN 5 THEN '余额消费' ELSE '其他' END"),
    CASE_FSTATUS("CASE %s WHEN 1 THEN '待审核' WHEN 2 THEN '待转账' WHEN 3 THEN '已转账' WHEN 4 THEN '未通过' END"),
    CASE_PAYMETHOD("CASE %s WHEN 1 THEN '支付宝' WHEN 2 THEN '微信' END"),
    LCASE("LCASE(%s)");

    private final String sql;

    FuncEnum(String sql) {
        this.sql = sql;
    }

    @Override
    public String getSql() {
        return this.sql;
    }
}